.TH std::istream_iterator::operator++,operator++(int) 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::istream_iterator::operator++,operator++(int) \- std::istream_iterator::operator++,operator++(int)

.SH Synopsis
   istream_iterator& operator++();     \fB(1)\fP
   istream_iterator operator++( int ); \fB(2)\fP

   Reads a value from the underlying stream (using its operator>>) and stores it into
   the iterator object. If the read fails (the underlying stream's fail() returns
   true), the iterator becomes the end-of-stream iterator.

   The behavior is undefined if the iterator is end-of-stream iterator.

.SH Parameters

   \fI(none)\fP

.SH Return value

   1) *this
   2) An istream_iterator that holds an unchanged value.

.SH Exceptions

   May throw implementation-defined exceptions.

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

     DR    Applied to         Behavior as published               Correct behavior
   LWG 260 C++98      the return type of operator++(int) was corrected to
                      istream_iterator&                      istream_iterator
                      the underlying stream's operator void*
                      was
   LWG 788 C++98      used to determine whether the read     uses fail() instead
                      fails, but it
                      was removed by the resolution of LWG
                      issue 468
   LWG 838 C++98      it was unclear whether end-of-stream   the behavior is undefined
                      iterators can be incremented
